package com.ndp.fb.rdb.api;


import com.ndp.fb.rdb.model.FeedFb;
import com.ndp.fb.rdb.model.FeedWe;

import java.util.List;

/**
 * Created by Elvis on 2016/4/14.
 */
public interface ProductFbFeedRdbService {

    /**
     * 获取产品Feed的列表
     * @return
     */
     List<FeedFb> getProductFbFeedList();

    int update(Long fbFeedId, String reprocessUrl, String latestUploadEndTime);

    /**
     * catalog 被物料样式占用，更新fb feed 对应的 url
     * @param fbCatalogId
     * @param reprocessUrl
     */
    void updateForCatalogId(Long fbCatalogId,String reprocessUrl);

    /**
     *
     * @param productFeedId
     * @return FeedFb
     */
    FeedFb getProductFbFeedByFeedId(Long productFeedId);

    /**
     * 根据feed id 查询ProductWeFeed
     * @param feedId
     * @return
     */
     FeedWe getProductWeFeedByFbFeedId(Long feedId);

    /**
     * 更新Productfeed 状态
     * @param fbFeedId
     * @return
     */
     int update(Long fbFeedId, String uploadErrorLevel, String uploadErrors,String latestUploadEndTime);


    FeedFb getProductFbFeedByCatalogId(Long catalogId);

    Long save(FeedFb feedFb);

    Long saveOrUpdate(FeedFb feedFb);

    void deleteByProductCatalogId(List<Long> catalogIds);
}
